feat: add complaint endpoint - #2
Conversation
OriHoch
left a comment
There was a problem hiding this comment.
Running a browser is very resource intensive, giving end user control over starting a browser is very risky and potential for problems like very easy DDOS. At a minimum this should be a different container, but need to see how much resources it needs
I would suggest the following changes:
- The API endpoint only saves the complaints locally in DB
- Daily cronjob takes the complaints from DB and runs the browser to send them
- Have some limitation over the number of complaints and/or length of time the cronjob runs - to prevent denial of service.
- Code can remain in this repo if you want but we should not include all the playwright dependencies in the backend api as it will make a huge container, should seperate to 2 containers - 1 with playwright and 1 without
regarding implementation - can do it using a Kubernetes cronjob - I can create that for you if you have a container which does the job
|
I think we might also encounter rate limiting / security blocks from the MOT side, but we will see, we have some whitelisted IPs on gov sites so it might not block them |
|
@OriHoch I've used the |
will let the user make an official complaint to the Israeli MOT